/*
 * File:    Test.java
 * Created: 18-Nov-2005
 * Version: $Id: //depot/bitgate/bsse/src/bitgate/util/config/Test.java#1 $
 *
 * COPYRIGHT (C) 2005, Bitgate Software, LLC.  All Rights Reserved.
 *
 * software@bitgatesoftware.com
 */

package com.bitgate.util.config;

import static com.bitgate.util.debug.Debug.*;

public class Test
{
    public static void main(String args[])
    {
        Config.getDefault().register(args[0], "service");
        debug("These should return values.");
        debug("protocol.http:");
        debug("    - Jar file = '" + Config.getDefault().parseConfig("service",
                    "/protocols/object[@type='protocol.http']/property[@type='protocol.jarfile']/@value") + "'");
        debug("    - Class Name = '" + Config.getDefault().parseConfig("service",
                    "/protocols/object[@type='protocol.http']/property[@type='protocol.classname']/@value") + "'");
        debug("    - Default Port = '" + Config.getDefault().parseConfig("service",
            "/protocols/object[@type='protocol.http']/object[@type='protocol.defaults']/property[@type='protocol.port']/@value") + "'");
        debug("    - Default Secure = '" + Config.getDefault().parseConfig("service",
            "/protocols/object[@type='protocol.http']/object[@type='protocol.defaults']/property[@type='protocol.secure']/@value") + "'");
        debug("protocol.https:");
        debug("    - Jar file = '" + Config.getDefault().parseConfig("service",
                    "/protocols/object[@type='protocol.https']/property[@type='protocol.jarfile']/@value") + "'");
        debug("    - Class Name = '" + Config.getDefault().parseConfig("service",
                    "/protocols/object[@type='protocol.https']/property[@type='protocol.classname']/@value") + "'");
        debug("    - Default Port = '" + Config.getDefault().parseConfig("service",
            "/protocols/object[@type='protocol.https']/object[@type='protocol.defaults']/property[@type='protocol.port']/@value") + "'");
        debug("    - Default Secure = '" + Config.getDefault().parseConfig("service",
            "/protocols/object[@type='protocol.https']/object[@type='protocol.defaults']/property[@type='protocol.secure']/@value") + "'");
        debug("[These should be null] protocol.ftp:");
        debug("    - Jar file = '" + Config.getDefault().parseConfig("service",
                    "/protocols/object[@type='protocol.ftp']/property[@type='protocol.jarfile']/@value") + "'");
        debug("    - Class Name = '" + Config.getDefault().parseConfig("service",
                    "/protocols/object[@type='protocol.ftp']/property[@type='protocol.classname']/@value") + "'");
        debug("    - Default Port = '" + Config.getDefault().parseConfig("service",
            "/protocols/object[@type='protocol.ftp']/object[@type='protocol.defaults']/property[@type='protocol.port']/@value") + "'");
        debug("    - Default Secure = '" + Config.getDefault().parseConfig("service",
            "/protocols/object[@type='protocol.ftp']/object[@type='protocol.defaults']/property[@type='protocol.secure']/@value") + "'");
    }
}
